package com.rcl.httpurlconnection.java;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/*
 * class title:
 * Author by RenChunLin, Email 18957806320@163.com, Date on 2020/10/15.
 * PS: Not easy to write code, please indicate.
 */
public class MapTest {

    private static StringBuilder sStringBuilder;

    public static void main(String[] args) {
        Map<String, String> map = new HashMap<>();
        map.put("娃娃", "12");
        map.put("米勒", "45");
        map.put("三三", "56");

        sStringBuilder = new StringBuilder("http://www.baidu.com/");
        Set<Map.Entry<String, String>> entries = map.entrySet();
        for (Map.Entry<String, String> entry : entries) {
            sStringBuilder.append(entry.getKey());
            sStringBuilder.append("=");
            sStringBuilder.append(entry.getValue());
        }

        System.out.println(sStringBuilder.toString());
    }
}
